
//获取应用实例
const app = getApp()
const api = require('../../utils/api.js');
Page({
	data: {
		point:0,
	},
	onShow: function() {
		this.getUserPoint(app.globalData.userId);
	},
	getUserPoint:function(ownerId){
		let _this = this;
		api.getUserPoint({
			data: {
				userId: ownerId,
			},
			success: function(res) {
				if(res.data.code == 0) {
					let point = res.data.point;
					_this.setData({
						point: point == null?0:point,
					});
				}
			},
		});
	},
	
})